package com.fuxin.app.task;

import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author fuxin
 * @date 2019/2/27 10:04
 * @description
 */
@Component
@EnableScheduling
public class BookTask {

	private long count = 0;

	@Scheduled(fixedDelay = 3000)
	public void taskA(){
		System.out.println("当前时间：" + System.currentTimeMillis() + "\n执行次数：" + count++);
	}


}
